package com.eyedog.video.mine;

import com.eyedog.library.mvp.BasePresenter;
import com.eyedog.video.http.ICallback;

import java.util.List;

/**
 * Created by thyme on 2019/7/22.
 */

public class MemberPresenter extends BasePresenter<constract.IMemberView, constract.IMemberModel> implements constract.IMemberPresenter
{
    public MemberPresenter(constract.IMemberView iMemberView, constract.IMemberModel iMemberModel)
    {
        super(iMemberView, iMemberModel);
    }

    @Override
    public void displaySearch()
    {
        model.loadMemberData(new ICallback<MemberData>() {
            @Override
            public void onLoadSuccess(MemberData memberData)
            {
                view.showMemberData(memberData);
            }

            @Override
            public void onLoadFailed(String err)
            {

            }
        });

        model.loadPlayCount(new ICallback<Integer>() {
            @Override
            public void onLoadSuccess(Integer integer)
            {
                view.showPlayCount(integer);
            }

            @Override
            public void onLoadFailed(String err)
            {

            }
        });

        model.loadImService(new ICallback<List<ImService>>() {
            @Override
            public void onLoadSuccess(List<ImService> imServices)
            {
                view.showImService(imServices);
            }

            @Override
            public void onLoadFailed(String err)
            {

            }
        });
    }
}
